
import { types } from '../types'

const state = {

  isLogin: false,
  number: 1,
  loginType: 'login',
  row: {}
}
const getters = {

}

const mutations = {
  [types.HANDLER_LOGIN](state: any, data: any) {
    state.loginType = data.type
    state.isLogin = data.bol
  },
  [types.CHANGE_LOGINTYPE](state: any, str: string) {
    state.loginType = str
  },
  [types.GET_DATA](state: any, data: any) {
    state.row = data
  }
}

const actions = {
  // fetchData({ commit }) {
  //   getAndCommit('/houseList', types.GET_DATA, commit)
  // }
}

export default {
  namespaced: true, //命名空间
  state,
  getters,
  mutations,
  actions
}
